-
Notifications
You must be signed in to change notification settings - Fork 13
Add elasticity #621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add elasticity #621
Conversation
…lasticity options
62a4c8f to
d1cef1f
Compare
|
one thing I think would be nice to have... dump all the structures used in calculation since they can be a good source of data for training |
I.e. also the non-optimised strained structures? Currently you can dump:
|
can we have the initial ones too? |
ElliottKasoar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thank you @harveydevereux!
Can you add links to the tutorials with Colab links to the README/relevant user guide pages please?
I'm not sure writing the structures out works exactly as expected. If I run one of your example CLI commands:
janus elasticity --struct tests/data/NaCl.cif --arch mace_mp --shear-magnitude 0.1 --normal-magnitude 0.02 --n-strains 10 --write-structures
This writes either 60 or 61. structures, depending on whether we optimise nothing, or the (initial) structure(s).
I think I'd expect the number of structures in this file to be independent of the choice of optimisation?
It also seems to append the same file if I rerun the command, which I don't think is expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get
/Users/elliottkasoar/Documents/PSDI/janus-core/docs/source/apidoc/janus_core.rst:48: WARNING: py:class reference target not found: ElasticTensor [ref.class]
Can you try updating the intersphinx mapping to include pymatgen, and if that doesn't work, add this to the ignore list?
| "outputs": [], | ||
| "source": [ | ||
| "from janus_core import __version__\n", | ||
| "()\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be nice either in this or the Python tutorial to visualise all the structures we generate? Weas can read a "trajectory" e.g. our generated structures.
Or does it not look very interesting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well for the tutorial, I've not looked how visual it is. Will check
In this case its the initial structure I was thinking though if it is also useful to split the optimised, and pre-optimised outputs into two separate files? Or does optimisation push some meta data to a structure to tag them in one file? Perhaps also the strain can be put in meta data (if its not already somehow). |
Draft additions to implement the elasticity calculations for issue #620.
Notebook tutorials have a three-way comparison between Aluminium, Diamond, and a Carbon-nanotube
At the moment the core output is the pymatgen
ElasticityTensorwhich houses properties and methods relating to the data.Written output is for now the derived data and the whole tensor.
$ cat elasticity-elastic_tensor.dat # Bulk modulus (Reuss) [GPa] | Bulk modulus (Voigt) [GPa] | Bulk modulus (VRH) [GPa] | Shear modulus (Reuss) [GPa] | Shear modulus (Voigt) [GPa] | Shear modulus (VRH) [GPa] | Young's modulus [GPa] | Universal anisotropy | Homogeneous Poisson ratio | Elastic constants (row-major) [GPa] 80.34637735135314 80.34637735135317 80.34637735135315 22.54802608157279 23.344621055880044 22.946323568726417 62855302809.64485 0.17664405997788535 0.36961597838074717 104.69105725174975 0.0 0.0 0.0 68.1740374011551 0.0 0.0 0.0 68.17403740115496 0.0 26.7353618096018 0.0 26.7353618096018 0.0 0.0 0.0 0.0 0.0 0.0 0.0 26.735361809601777 0.0 0.0 0.0 26.735361809601777 0.0 0.0 0.0 26.7353618096018 0.0 26.7353618096018 0.0 0.0 0.0 0.0 0.0 68.17403740115469 0.0 0.0 0.0 104.69105725174938 0.0 0.0 0.0 68.1740374011544 0.0 0.0 0.0 0.0 0.0 26.73536180960179 0.0 26.73536180960179 0.0 0.0 0.0 26.735361809601777 0.0 0.0 0.0 26.735361809601777 0.0 0.0 0.0 0.0 0.0 0.0 0.0 26.73536180960179 0.0 26.73536180960179 0.0 68.17403740115525 0.0 0.0 0.0 68.17403740115505 0.0 0.0 0.0 104.69105725174995However the 6x6 Voigt form would be nice (with names), by the looks
Tensor.get_voigt_dictmight gives those indices, and there are some helpers for the naming conventions too. But maybe someone does want the whole thing.Feature TODO
DeformedStructureSetetc.Testing TODO